import { UserLoginAccount } from '../stores/Login'
import { useRouter } from "vue-router";
export const useSetup =()=>{
    const router=useRouter()
    //返回上一级
    const onClickLeft = () => history.back();
     //获取store
    const accountStore = UserLoginAccount()
    //退出按钮
    const bindOut=()=>{
        const res=localStorage.getItem('TOKEN')
       
            //跳转
            router.push('/login')
            //退出
            localStorage.removeItem('TOKEN')
            accountStore.account.name=''
            accountStore.account.url=''
       
      
    }
    return {onClickLeft,bindOut}
}